<template>
	<view class="edit-user">
		<ul class="type">
			<li>
				<text>头像</text>
				<img src="/static/user/user.png" alt="">
			</li>
			<li>
				<text>昵称</text>
				<text class="value">12414</text>
			</li>
			<li>
				<text>手机号</text>
				<text class="value">18800000000</text>
			</li>
		</ul>
		<ul class="type">
			<li @tap="toPage('/pages/adressList/adressList')">
				<text>收货地址管理</text>
				<uni-icons type="arrowright" size="20" color="#ccc"></uni-icons>
			</li>
		</ul>
		<button class="out-login" @tap="outLogin">退出登录</button>
	</view>
</template>

<script>
	export default {
		data () {
			return {
				
			}
		},
		methods: {
			toPage (url) {
				uni.navigateTo({
					url
				})
			},
			outLogin () {
				uni.showModal({
					title: '提示',
					content: '确定退出当前账号吗？',
					success(res) {
						if(res.confirm) {
							console.log('确定退出')
						}
					}
				})
			}
		}
	}
</script>

<style scoped lang="scss">
.edit-user {
	background: #f7f7f7;
	height: 100vh;
	.type {
		background: #fff;
		margin-bottom: 15px;
		li {
			border-bottom: 1px solid #ccc;
			display: flex;
			justify-content: space-between;
			align-items: center;
			height: 50px;
			font-size: 14px;
			padding: 0 10px;
			box-sizing: border-box;
			img {
				height: 40px;
				width: 40px;
			}
			.value {
				font-size: #555;
			}
			&:last-of-type {
				border-bottom: 1px solid transparent;
			}
		}
	}
	// 退出登录
	.out-login {
		position: fixed;
		bottom: 40px;
		left: 10%;
		width: 80%;
		margin: 0 auto;
		border: 1px solid $primary-color;
		color: $primary-color;
		background: transparent;
		border-radius: 25px;
	}
}
</style>
